ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2024 feature!
Help / WLanguage / WLanguage functions / Communication / Drive functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Renames a directory or Google Docs Editors file on Google Drive.
Example
oOAuth2Param is OAuth2Parameters
oOAuth2Param.ClientID = "client_id"
oOAuth2Param.ClientSecret = "client_secret"
oOAuth2Param.RedirectionURL = "http://localhost:9000/"

GoogleDrive is gglDrive
GoogleDrive = GglDriveConnect(oOAuth2Param)

sNewName is string
sNewName = ExtractString(UncompleteDir(EDT_DirectoryToRename), 1, "/", FromEnd)
sNewName += "_NEW_" + SysDateTime()

IF GoogleDrive.Rename(EDT_DirectoryToRename, sNewName) = False THEN
Error("Unable to rename directory", ErrorInfo())
RETURN
END
Syntax
<Result> = <Google Drive>.Rename(<File to rename> , <New name>)
<Result>: Boolean
  • True if the file was renamed,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Google Drive>: gglDrive variable
Name of the gglDrive variable that corresponds to the drive to be used. The connection to the drive must have been previously established. Otherwise, the element is not copied.
<File to rename>: GglFile variable
Name of the GglFile variable that corresponds to the Google Docs Editors file to be used.
<New name>: Character string
New element name.
Related Examples:
Drive functions Unit examples (WINDEV): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
Drive functions Unit examples (WINDEV Mobile): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
Business / UI classification: Business Logic
Component: wd290ggl.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/05/2024

Send a report | Local help